package MyMap;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;

public class demo1 {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        map.put("张德明","帅哥");
        map.put("赵子涵","丑陋");
        map.put("嘿嘿嘿","sb");
//        Set<Map.Entry<String, String>> entries = map.entrySet();
//        for (Map.Entry<String, String> entry : entries) {
//            System.out.println(entry.getKey() + "=" + entry.getValue());
//        }
        Set<String> set = map.keySet();
        Iterator<String> iterator = set.iterator();
        while (iterator.hasNext()){
            String s = iterator.next();
            String s1 = map.get(s);
            System.out.println(s + "=" + s1);

        }
    }
}
